//
//  GestureCommon.swift
//  EasePods
//
//  Created by 李然 on 2024/5/10.
//

import Foundation
import CRPEarPhone

extension CRPEarType {
    var title: String {
        switch self {
        case .left:
            return R.string.localizable.earbuds_find_left_ear_text()
        case .right:
            return R.string.localizable.earbuds_find_right_ear_text()
        @unknown default:
            return ""
        }
    }
}

extension CRPButtonMode {
    var title: String {
        switch self {
        case .click:
            return R.string.localizable.gesture_control_click_text()
        case .doubleClick:
            return R.string.localizable.gesture_control_double_click_text()
        case .tripleClick:
            return R.string.localizable.gesture_control_triple_click_text()
        case .longPress:
            return R.string.localizable.gesture_control_long_press_text()
        default:
            return ""
        }
    }
}

extension CRPButtonFuncType {
    
    var title: String {
        switch self {
        case .playPause:
            return R.string.localizable.gesture_control_play_and_pause_text()
        case .prev:
            return R.string.localizable.gesture_control_previous_piece_text()
        case .next:
            return R.string.localizable.gesture_control_next_track_text()
        case .answer:
            return R.string.localizable.gesture_control_answer_the_phone_text()
        case .hangup:
            return R.string.localizable.gesture_control_hang_up_the_phone_text()
        case .reject:
            return R.string.localizable.gesture_control_reject_call_text()
        case .volUp:
            return R.string.localizable.gesture_control_volume_up_text()
        case .volDown:
            return R.string.localizable.gesture_control_volume_down_text()
        case .aiVoice:
            return R.string.localizable.gesture_control_voice_assistant_text()
        case .ancMode:
            return ""
        case .none:
            return "none"
        default:
            return ""
        }
    }
}
